import request from '../../utils/request'

// 获取权限列表
export const getListUser = params => {
  return request({
    method: 'GET',
    url: 'permissions',
    params
  })
}

// 修改权限列表
export const upDateListUser = (id, data) => {
  return request({
    method: 'PUT',
    url: `/permissions/${id}`,
    data
  })
}
// 获取权限
export const getjurisdiction = (id, data) => {
  return request({
    method: 'GET',
    url: `/permissions/${id}`,
    data
  })
}
// 获取菜单列表
export const getMenusUser = () => {
  return request({
    method: 'GET',
    url: '/menus'
  })
}
// 添加权限
export const addjurisdiction = data => {
  return request({
    method: 'POST',
    url: '/permissions',
    data
  })
}
// 删除权限
export const deleListUser = id => {
  return request({
    method: 'DELETE',
    url: `/permissions/${id}`
  })
}
// 权限详情
export const particulars = (id, data) => {
  return request({
    method: 'GET',
    url: `/permissions/${id}`,
    data
  })
}
